package week6;

import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

public class week6 extends MIDlet {
	private Display dispaly;
	private WelcomeForm welcomeForm ;   
	private ImageItemForm imgForm;
	private DateFieldForm dateForm;
	
	public week6() {
		dispaly = Display.getDisplay(this); 
		welcomeForm = new WelcomeForm(this);  
		imgForm = new ImageItemForm(this);
		dateForm = new  DateFieldForm(this);
	}
	protected void startApp() throws MIDletStateChangeException {
		dispaly.setCurrent(welcomeForm);
	}
	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
	}
	protected void pauseApp() {
	}
	
    public void changeForm(String formName)
	{
		if(formName.equals("welcomeForm")) 
		{
			dispaly.setCurrent(welcomeForm);
		}	
		else if(formName.equals("ImageItemForm"))  
		{
			dispaly.setCurrent(imgForm);
		}
		else if(formName.equals("DateFieldForm"))  
		{
			dispaly.setCurrent(dateForm);
		}  
	}
}
